package com.yuke.cloud.service.uac.dao;

import com.yuke.cloud.common.core.mybatis.MyMapper;
import com.yuke.cloud.service.uac.dto.BindUserDto;
import com.yuke.cloud.service.uac.dto.UserGroupDto;
import com.yuke.cloud.service.uac.entity.AccUserGroup;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AccUserGroupMapper extends MyMapper<AccUserGroup> {
    //查看员工
    UserGroupDto selectUserGroupInfoByUserId(@Param("userId") Long userId);
    //查看店员
    UserGroupDto selectUserGroupByUserId(@Param("userId") Long userId);
    /**
     * Select all need bind user list.
     *
     * @param superManagerRoleId the super manager role id
     * @param currentUserId      the current user id
     *
     * @return the list
     */
    List<BindUserDto> selectAllNeedBindUser(@Param("superManagerRoleId") Long superManagerRoleId, @Param("currentUserId") Long currentUserId/*, @Param("groupId") Long groupId*/);
    List<BindUserDto> selectAllNeedBindUserEx(@Param("superManagerRoleId") Long superManagerRoleId, @Param("currentUserId") Long currentUserId);
    List<BindUserDto> selectAllNeedBindUserExAdmin(@Param("adminUserId") Long adminUserId);

    /**
     * List by group id list.
     *
     * @param groupId the group id
     *
     * @return the list
     */
    List<AccUserGroup> listByGroupId(@Param("groupId") Long groupId);

    /**
     * Delete exclude super mng int.
     *
     * @param groupId            the group id
     * @param superManagerRoleId the super manager role id
     *
     * @return the int
     */
    int deleteExcludeSuperMng(@Param("currentGroupId") Long groupId, @Param("superManagerRoleId") Long superManagerRoleId, @Param("notDelUserIdList") List<Long> notDelUserIdList);

    int deleteExcludeSuperMngExAdmin(@Param("currentGroupId") Long groupId, @Param("adminUserId") Long adminUserId, @Param("notDelUserIdList") List<Long> notDelUserIdList);
}